Skip to content

Instantly share code, notes, and snippets.

View dodbrian's full-sized avatar

Denis Zimin dodbrian

View GitHub Profile
@dodbrian
dodbrian / slicer.js
Created May 19, 2025 14:25
Splits a long file created by git2gpt into smaller chunks
#!/usr/bin/env node
import { createWriteStream, createReadStream } from 'fs';
import { basename, extname } from 'path';
import { createInterface } from 'readline';
const args = process.argv.slice(2);
if (args.length !== 2) {
console.error('Usage: slicer <input_file> <target_size_mb>');
@dodbrian
dodbrian / Throttler.cs
Created May 5, 2025 12:42
Provides a mechanism to throttle the execution of actions on state updates
/// <summary>
/// Provides a mechanism to throttle the execution of actions on state updates.
/// </summary>
/// <typeparam name="T">The type of state to throttle. Must be a reference type.</typeparam>
public class Throttler<T> : IDisposable
where T : class
{
private readonly ILogger<Throttler<T>> _logger;
private readonly IGrainBase _grain;
private readonly TimeSpan _throttleInterval;
@dodbrian
dodbrian / dotnet2_2_to_3_1_migration.md
Last active July 24, 2020 16:17
Migration from .NET Core 2.2 to 3.1

Migration from .NET Core 2.2 to 3.1

Update *.csproj files

Change target framework:

<TargetFramework>netcoreapp3.1</TargetFramework>

or for libraries:

@dodbrian
dodbrian / linux-commands.md
Last active June 5, 2022 21:40
Linux Commands
@dodbrian
dodbrian / linux-version.md
Last active October 27, 2019 10:48
Get Linux Version

Get Linux Version

Commands

cat /etc/os-release
lsb_release -a
uname -a
hostnamectl
cat /proc/version
dmesg grep | Linux
@dodbrian
dodbrian / reset-rabbitmq.sh
Last active July 25, 2019 11:46
Clean up RabbitMQ (remove queues and exchanges)
#!/bin/bash
rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl start_app